home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d17 / lmagic.arc / ICNSTRUC.DOC < prev    next >
Text File  |  1990-12-15  |  3KB  |  91 lines

  1. TURBO PASCAL PROGRAMMERS:
  2.  
  3. This file contains the [Turbo] Pascal data and file structure
  4. for LABEL MAGIC unpacked icons.  Label Magic icons are normally stored packed
  5. and must be converted to unpacked (using CONVICON.EXE, mentioned below) so
  6. that they may be used with the following structure.
  7.  
  8. ============================================================================
  9.  
  10. CONST
  11.   MaxX = 50;
  12.   MaxY = 50;
  13. TYPE
  14.   { UnPacked Icon DATA TYPE }
  15.   Icon_Type = ARRAY[1..MaxX,1..MaxY] OF BOOLEAN;
  16.  
  17. VAR
  18.   Icon  : Icon_Type;
  19.   IconF : FILE OF Icon_Type;   { Random access file type }
  20.  
  21. ============================================================================
  22.  
  23.  
  24. COMMENTS:
  25.  
  26. Icons are stored as record #0 in the random access file, IconF.
  27.  
  28. Your programs may shell into the conversion program (CONVICON.EXE), using the
  29. appropriate parameters, to UNPACK the 350 byte icons.  Packed (350 byte) icons
  30. may be converted either to "unpacked" (shown above), "TEXT" ('*' and ' ') or
  31. ASCII ('█', '▄', '▀', or ' ').
  32.  
  33.  
  34. SIMPLE PROGRAMMING EXAMPLE:
  35.  
  36. {$M 16000,0,0}
  37. PROGRAM Load_Icon;
  38. USES
  39.   Dos;
  40. TYPE
  41.   Icon_Type = ARRAY[1..50,1..50] OF BOOLEAN;
  42. VAR
  43.   Icon  : Icon_Type;
  44.   IconF : FILE OF Icon_Type;
  45.  
  46. BEGIN
  47.   EXEC( 'CONVICON.EXE',' U LM.ICN LM.ICN' );  { Unpack icon so I can use it }
  48.   ASSIGN( IconF,'LM.ICN' );
  49.   RESET( IconF );
  50.   READ(IconF,Icon);
  51.   CLOSE(IconF);
  52.   .
  53.   .
  54.   .
  55.   Do graphics whatever.
  56.   .
  57.   .
  58.   .
  59.   EXEC( 'CONVICON.EXE',' P LM.ICN LM.ICN' );  { Pack so Label Magic can use it }
  60. END.
  61.  
  62.  
  63.  
  64. CONVICON.EXE Information (as used from the DOS command line):
  65.  
  66. ============================================================================
  67. CONVICON Version 1.0 - Copyright (C)1989 NEOCOM by Joseph M. Albanese
  68.  
  69. Label Magic Icon Utility
  70.  
  71. SYNTAX:    C>convicon [OPTION] <infile.ext> <outfile.ext>
  72.  
  73. OPTIONS:   T - Convert a packed icon (350 byte) to a text icon
  74.            I - Convert a text icon to a packed icon (350 byte)' );
  75.            A - Convert a packed icon (350 byte) to an ASCII icon' );
  76.            B - Convert an ASCII icon BACK to a packed icon');
  77.            U - Convert a packed icon (350 byte) to an UNpacked icon (2500 byte)' );
  78.            P - Convert an unpacked icon (2500 byte) to a PACKed icon (350 byte)' );
  79.  
  80. EXAMPLES:  C>convicon t lm.icn lm.txt' );
  81.            C>convicon a lm.icn lm.asc' );
  82.            C>convicon b lm.asc lm.icn' );
  83. ============================================================================
  84.  
  85. ONE FINAL NOTE:
  86.  
  87. The unpacked icons, produced in label magic, do not necessarily have
  88. to be stored one-per-file.  A random access file of many [unpacked] icons could
  89. be used to store an animation sequence of single-color objects to be used
  90. in a game, for instance.
  91.